@ts-nocheck
<template>
  <div class="header">
    <div class="header-cell header-cell-left">
      <div v-if="isWideEnough" class="vertical-align-center">
        <Logo @click="$emit('logoClicked')" />
        <ThemeSwitcher />
      </div>
      <div v-else>
        <el-button
          text
          @click="$emit('logoClicked')"
          style="width: 40px; height: 40px"
        >
          <el-icon style="transform: scale(1.5)"><Notification /></el-icon>
        </el-button>
      </div>
    </div>
    <div class="header-cell header-cell-middle">
      <Logo v-if="!isWideEnough" />
    </div>
    <div class="header-cell header-cell-right">
      <Navigation />
    </div>
  </div>
</template>

<script setup>
import { computed } from "vue";
import ThemeSwitcher from "@/components/ThemeSwitcher.vue";
import Navigation from "@/views/Navigation/index.vue";
import useCommonStore from "@/store/common.js";
import Logo from "./logo.vue";

const commonStore = useCommonStore();
const isWideEnough = computed(() => commonStore.isWideEnough);
</script>

<style scoped>
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  z-index: 22;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  background-color: var(--el-bg-color);
}

.header-cell-left {
  padding-left: 12px;
}
.header-cell-right {
  padding-right: 12px;
}
</style>
